<template>

	<view style="width: 100%;
	height: 100vh;
	background-color: #f9f8f8;
	padding-top: 10px; ">
		<view class="list one" @click="handledianji1">
			<view>
				<img class="img" src="../../static/pjicon.png" alt="">
			</view>
			<view>专项学习</view>
			<view class="imgs"><img src="../../static/pjxs.png" alt=""></view>

		</view>
		<view class="list two" @click="handledianji2">
			<view>
				<img class="img" src="../../static/pjicon.png" alt="">
			</view>
			<view>视屏课程</view>
			<view class="imgs"><img src="../../static/pjxs.png" alt=""></view>
			<u-toast ref="uToast"></u-toast>

		</view>
	</view>
</template>

<script>
export default {
	methods: {

		handledianji1() {
		
			if (!uni.getStorageSync('ykt_openId')) {
				this.$refs.uToast.show({
					type: 'default',
					message: "请先登录",
				})
				uni.switchTab({
					url: '/pages/my/index'
				});
			} else {
				uni.navigateTo({
					url: '/pages/special/xuexi'
				});
			}

		},

		handledianji2() {
			if (!uni.getStorageSync('ykt_openId')) {
				this.$refs.uToast.show({
					type: 'default',
					message: "请先登录",
				})
				uni.switchTab({
					url: '/pages/my/index'
				});
			} else {
				uni.navigateTo({
					url: '/pages/special/video'
				});
			}

		}
	}

}
</script>

<style scoped lang="scss">
.list {
	height: 180rpx;
	margin-left: 10px;
	margin-right: 10px;
	margin-bottom: 10px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #fff;
	font-weight: 600;
	font-size: 38rpx;
	cursor: pointer;
	border-radius: 10rpx;

	.img {
		width: 90rpx;
		height: 70rpx;
		padding-left: 50rpx;
	}

	.imgs {
		height: 180rpx;
		width: 300rpx;

		img {
			width: 100%;
			height: 100%;
		}
	}
}

.one {
	background-image: linear-gradient(to right, #61b3fa, #6493f9);
}

.two {
	background-image: linear-gradient(to right, #a584fa, #c79ffa);
}
</style>